package com.agileboot.attendance.domain.supplier.command;

import com.agileboot.common.annotation.ExcelColumn;
import com.agileboot.common.annotation.ExcelSheet;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import lombok.Data;

/**
 * <p>
 * 添加供应商命令
 * </p>
 *
 * @author agileboot
 * @since 2023-03-14
 */
@Data
@ApiModel(value = "添加供应商命令")
@ExcelSheet(name = "供应商数据")
public class AddSupplierCommand {

    @ApiModelProperty("供应商名称")
    @NotBlank(message = "供应商名称不能为空")
    @Size(max = 100, message = "供应商名称长度不能超过100个字符")
    @ExcelColumn(name = "供应商名称")
    private String supplierName;

    @ApiModelProperty("供应商编码")
    @NotBlank(message = "供应商编码不能为空")
    @Size(max = 50, message = "供应商编码长度不能超过50个字符")
    @Pattern(regexp = "^[A-Za-z0-9]+$", message = "供应商编码只能包含字母和数字")
    @ExcelColumn(name = "供应商编码")
    private String supplierCode;

    @ApiModelProperty("联系人姓名")
    @Size(max = 50, message = "联系人姓名长度不能超过50个字符")
    @ExcelColumn(name = "联系人姓名")
    private String contactName;

    @ApiModelProperty("联系人电话")
    @Pattern(regexp = "^1[3456789]\\d{9}$", message = "手机号码格式不正确")
    @ExcelColumn(name = "联系人电话")
    private String contactPhone;

    @ApiModelProperty("联系人邮箱")
    @Email(message = "邮箱格式不正确")
    @Size(max = 100, message = "邮箱长度不能超过100个字符")
    @ExcelColumn(name = "联系人邮箱")
    private String contactEmail;

    @ApiModelProperty("供应商地址")
    @Size(max = 200, message = "供应商地址长度不能超过200个字符")
    @ExcelColumn(name = "供应商地址")
    private String address;

    @ApiModelProperty("状态（0正常 1停用）")
    @ExcelColumn(name = "状态")
    private String status = "0";

    @ApiModelProperty("备注")
    @Size(max = 500, message = "备注长度不能超过500个字符")
    @ExcelColumn(name = "备注")
    private String remark;
} 